home *** CD-ROM | disk | FTP | other *** search
/ IRIX Patches 1995 June / SGI IRIX Patches 1995 Jun.iso / 5.3_patches / patchSG0000154 / patchSG0000154.idb / usr / share / src / OpenGL / libaux / font.c.z / font.c
Encoding:
C/C++ Source or Header  |  1995-06-12  |  464 b   |  28 lines

  1. #include "tk.h"
  2. #include "aux.h"
  3.  
  4. #if defined(__cplusplus) || defined(c_plusplus)
  5. #define class c_class
  6. #endif
  7.  
  8.  
  9. static GLuint bitmapBase;
  10.  
  11.  
  12. void auxCreateFont(void)
  13. {
  14.     bitmapBase = glGenLists(256);
  15.     if (tkCreateBitmapFont(bitmapBase) == GL_FALSE) {
  16.         auxQuit();
  17.     }
  18. }
  19.  
  20. void auxDrawStr(char *str)
  21. {
  22.  
  23.     glPushAttrib(GL_LIST_BIT);
  24.     glListBase(bitmapBase);
  25.     glCallLists(strlen(str), GL_UNSIGNED_BYTE, (unsigned char *)str);
  26.     glPopAttrib();
  27. }
  28.